import {percent} from './percent.js';
//获取按钮
let btn = document.querySelector('button');

btn.onclick = function(){
  //根据 30% 概率的结果弹出内容
  if(percent(30)){
    alert('中奖啦~')
  }else{
    alert('再接再厉~~')
  }
}